3.1562 \(\int (a+\frac{b}{x})^2 x^2 \, dx\)

Optimal. Leaf size=14 \[ \frac{(a x+b)^3}{3 a} \]

[Out]

(b + a*x)^3/(3*a)

________________________________________________________________________________________

Rubi [A]  time = 0.00388, antiderivative size = 14, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 13, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.154, Rules used = {263, 32} \[ \frac{(a x+b)^3}{3 a} \]

Antiderivative was successfully verified.

[In]

Int[(a + b/x)^2*x^2,x]

[Out]

(b + a*x)^3/(3*a)

Rule 263

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Int[x^(m + n*p)*(b + a/x^n)^p, x] /; FreeQ[{a, b, m
, n}, x] && IntegerQ[p] && NegQ[n]

Rule 32

Int[((a_.) + (b_.)*(x_))^(m_), x_Symbol] :> Simp[(a + b*x)^(m + 1)/(b*(m + 1)), x] /; FreeQ[{a, b, m}, x] && N
eQ[m, -1]

Rubi steps

\begin{align*} \int \left (a+\frac{b}{x}\right )^2 x^2 \, dx &=\int (b+a x)^2 \, dx\\ &=\frac{(b+a x)^3}{3 a}\\ \end{align*}

Mathematica [A]  time = 0.0012913, size = 14, normalized size = 1. \[ \frac{(a x+b)^3}{3 a} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + b/x)^2*x^2,x]

[Out]

(b + a*x)^3/(3*a)

________________________________________________________________________________________

Maple [A]  time = 0.002, size = 13, normalized size = 0.9 \begin{align*}{\frac{ \left ( ax+b \right ) ^{3}}{3\,a}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b/x)^2*x^2,x)

[Out]

1/3*(a*x+b)^3/a

________________________________________________________________________________________

Maxima [A]  time = 0.950026, size = 27, normalized size = 1.93 \begin{align*} \frac{1}{3} \, a^{2} x^{3} + a b x^{2} + b^{2} x \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b/x)^2*x^2,x, algorithm="maxima")

[Out]

1/3*a^2*x^3 + a*b*x^2 + b^2*x

________________________________________________________________________________________

Fricas [A]  time = 1.38927, size = 42, normalized size = 3. \begin{align*} \frac{1}{3} \, a^{2} x^{3} + a b x^{2} + b^{2} x \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b/x)^2*x^2,x, algorithm="fricas")

[Out]

1/3*a^2*x^3 + a*b*x^2 + b^2*x

________________________________________________________________________________________

Sympy [B]  time = 0.057442, size = 19, normalized size = 1.36 \begin{align*} \frac{a^{2} x^{3}}{3} + a b x^{2} + b^{2} x \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b/x)**2*x**2,x)

[Out]

a**2*x**3/3 + a*b*x**2 + b**2*x

________________________________________________________________________________________

Giac [A]  time = 1.17633, size = 27, normalized size = 1.93 \begin{align*} \frac{1}{3} \, a^{2} x^{3} + a b x^{2} + b^{2} x \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b/x)^2*x^2,x, algorithm="giac")

[Out]

1/3*a^2*x^3 + a*b*x^2 + b^2*x